package com.shop.event;

import java.io.Serializable;

import org.hibernate.event.internal.DefaultSaveEventListener;
import org.hibernate.event.spi.SaveOrUpdateEvent;

public class MySaveListener extends DefaultSaveEventListener {
	private static final long serialVersionUID = 372276783968320158L;

	@Override
	protected Serializable performSaveOrUpdate(SaveOrUpdateEvent event) {
		System.out.println("自定义的save事件");
		System.out.println("实体类的名字:"+event.getEntity());
		return super.performSaveOrUpdate(event);
	}
}
